package cn.wyl.system.mapper;

import cn.wyl.system.domain.Role;
import cn.wyl.basic.mapper.BaseMapper;
//注意导第二个包
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author wyl
 * @since 2022-07-24
 */
public interface RoleMapper extends BaseMapper<Role> {

    void removeRolePermissionByRoleId(Long id);

    void removeRoleMenuByRoleId(Long id);

    void removeEmployeeRole(Long id);

    //添加中间表信息：t_role_permission
    void saveRolePermissons(@Param("rid") Long id, @Param("permissions") List<Long> permissions);
    //添加中间表信息：t_role_menu
    void saveRoleMenus(@Param("rid") Long id, @Param("menus") List<Long> menus);
}
